<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>注册界面</title>
    <link rel="stylesheet" href="/static/bootstrap-3.4.1-dist/css/bootstrap.min.css">
    <script src="https://cdn.staticfile.org/jquery/3.2.1/jquery.min.js"></script>
    <script src="https://cdn.staticfile.org/popper.js/1.15.0/umd/popper.min.js"></script>
    <script src="https://cdn.staticfile.org/twitter-bootstrap/4.3.1/js/bootstrap.min.js"></script>
    <script>
    $(function(){
     $('#codeimg').click(function (){
     $(this).attr('src', "/captcha?"+new Date().getTime())
     });
    });
</script>

    <style>
         .login-form {
             border: 1px solid lightgray;
             border-radius: 5px;
             width: 400px;
             min-height: 200px;
             position: absolute;
             left: 50%;
             top: 50%;
             transform: translate(-50%, -50%);
             background-color: #fff;
         }
         .login-form h1{
            text-align: center;
         }
         .code-img{
             height: 34px;
             width: 70px;
         }



    </style>
</head>

<body background="static/bg.png">
<nav class="navbar navbar-inverse">
    <div class="container-fluid">
        <!-- Brand and toggle get grouped for better mobile display -->
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse"
                    data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <img src="static\logo.jpg" width="150" height="50">
            <!--      <a class="navbar-brand" href="#">Brand</a>-->
        </div>

        <!-- Collect the nav links, forms, and other content for toggling -->
        <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
            <ul class="nav navbar-nav">
                <li><a href="/login">登录 <span class="sr-only">(current)</span></a></li>
                <li><a href="/new">注册</a></li>
                <li class="dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true"
                       aria-expanded="false">可视化 <span class="caret"></span></a>
                    <ul class="dropdown-menu">
                        <li><a href="#">折线图</a></li>
                        <li><a href="#">XX图</a></li>
                        <li><a href="#">XX图</a></li>
                        <li role="separator" class="divider"></li>
                        <li><a href="#">XX图</a></li>
                        <li role="separator" class="divider"></li>
                        <li><a href="#">可视化大屏展示</a></li>
                    </ul>
                </li>
            </ul>
            <ul class="nav navbar-nav navbar-right">
                <li class="active"><a href="/index">数据展示</a></li>
                </li>
            </ul>
        </div><!-- /.navbar-collapse -->
    </div><!-- /.container-fluid -->
</nav>



<div class="container login-form">
<!--    <img src="static/logo.png" style="height: 50px">-->
    <h2 style="text-align: center;">注册账号</h2>
    <h3>{{ error }}</h3>
    <input type="hidden" name="id" value="{{user.id}}">
    <form method="get" action="/register" class="form-horizontal">
        <div class="form-group">
            <label for="username" class="col-sm-3 control-label">用户名</label>
            <div class="col-sm-9">
                <input type="text" class="form-control" id="username"
                       name="username" placeholder="请输入用户名" value="{{user.username}}">
            </div>
        </div>
        <div class="form-group">
            <label for="password" class="col-sm-3 control-label">密码</label>
            <div class="col-sm-9">
                <input type="password" class="form-control" id="password"
                       name="password" placeholder="请输入密码" value="{{user.password}}">
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-12">
                <button type="submit" class="btn btn-primary btn-block">注册
                </button>
            </div>
        </div>
    </form>
</div>

</body>


</html>